Skip to content

Dynamic error message for function signature mismatch - #171

Merged
ritaagarwala-sf merged 2 commits into
developfrom
dynamic_error_message_develop
Nov 12, 2026
Merged

ritaagarwala-sf merged 2 commits into
developfrom
dynamic_error_message_develop

Conversation

@ritaagarwala-sf

Copy link
Copy Markdown
Collaborator

Summary

  • The deploy contract-mismatch error always listed SearchIndexChunkingV1Request/SearchIndexChunkingV1Response, since SearchIndexChunking was the default. It is now built from the registered features.
  • REQUEST_TYPE_TO_FEATURE is keyed by (request_type, response_type) and maps to the feature name, so a pair is matched as a unit.
  • New describe_supported_signatures() in deploy.py: if the request or response type belongs to one known feature, only that feature's expected pair is shown, formatted Req/Resp for use_in_feature: <Feature>; otherwise all supported pairs are listed.

Work item: W-24747155

Test plan

  • pytest tests/test_cli.py tests/test_deploy.py tests/test_describe_supported_signatures.py
  • mypy src/datacustomcode/cli.py src/datacustomcode/deploy.py
  • Manually run datacustomcode deploy on a function package whose request annotation is wrong and check the message

🤖 Generated with Claude Code

@ritaagarwala-sf ritaagarwala-sf changed the title Dynamic error message for function signature mismatch (W-24747155) Dynamic error message for function signature mismatch Nov 12, 2026
@ritaagarwala-sf
ritaagarwala-sf merged commit 1ffbf04 into develop Nov 12, 2026
5 checks passed
ritaagarwala-sf added a commit that referenced this pull request Nov 12, 2026
…from develop #171, #172) (#173)

* Dynamic error message for function signature mismatch  (#171)

* Dynamic error message instead of static for function signature mistmatch

* Fixing lint error

* Copy tests/test.json from the function template instead of generating it (#172)

* Copying tests/test.json from templates instead of generating a new one

* Lint error fix
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants